/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jjsoft.celularessuc.gco.ui;

import com.jjsoft.celularessuc.gco.dao.GenericController;
import com.jjsoft.celularessuc.gco.mdl.Actializacion;
import com.jjsoft.celularessuc.gco.mdl.Cliente;
import com.jjsoft.celularessuc.gco.mdl.Factura;
import com.jjsoft.celularessuc.gco.mdl.Proforma;
import com.jjsoft.celularessuc.gco.mdl.Serviciotecnico;
import com.jjsoft.celularessuc.gco.mdl.Sucursal;
import com.jjsoft.celularessuc.gco.mdl.Transferencia;
import com.jjsoft.celularessuc.gco.neg.ActualizacionManager;
import com.jjsoft.celularessuc.gco.neg.CImprimir;
import com.jjsoft.celularessuc.gco.neg.ClienteManager;
import com.jjsoft.celularessuc.gco.neg.ConfiguracionManager;
import com.jjsoft.celularessuc.gco.neg.DiarioManager;
import com.jjsoft.celularessuc.gco.neg.FacturaManager;
import com.jjsoft.celularessuc.gco.neg.ProformaManager;
import com.jjsoft.celularessuc.gco.neg.ServicioTecnicoManager;
import com.jjsoft.celularessuc.gco.neg.SucursalManager;
import com.jjsoft.celularessuc.gco.neg.TransferenciaManager;
import com.jjsoft.celularessuc.gco.rep.ReportePDF;
import com.jjsoft.celularessuc.gco.util.CNumeros;
import com.jjsoft.celularessuc.gco.util.configuraciones;
import java.awt.event.KeyEvent;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import net.sf.jasperreports.engine.JRException;
//import reportes.ReportePDF;
//import util.CNumeros;

/**
 *
 * @author johnny
 */
public class VPrincipal extends javax.swing.JFrame {

    /**
     * Creates new form VPrincipal
     */
    List<Cliente> listaClientes;
    Cliente cliente;
    int i = 0;
    List<Sucursal> sucursales;
    private static VPrincipal instance;
    SucursalManager sm = new SucursalManager();

    public static VPrincipal getInstance() {
        if (instance == null) {
            instance = new VPrincipal();
        }
        return instance;
    }

    public VPrincipal() {
        setIconImage(new ImageIcon(getClass().getResource("/img/1362798841_CellPhone.png")).getImage());
        setTitle("Sistema Ventas " + configuraciones.getInstance().getConfiguracion().getNombreLocal());
        ImageIcon icono = null;
        if (configuraciones.getInstance().getConfiguracion().getLogo() != null) {
            configuraciones.getInstance().getConfiguracion().setLogo(configuraciones.getInstance().getConfiguracion().getLogo().replace('\\', '/'));

            icono = new ImageIcon(configuraciones.getInstance().getConfiguracion().getLogo());
        }
        initComponents();
        
        this.cmdProformar.setVisible(true);
        this.cmdProformar.setMnemonic(KeyEvent.VK_P);
        this.cmdFacturar.setMnemonic(KeyEvent.VK_F);
        this.cmdServicio.setMnemonic(KeyEvent.VK_S);
        this.cmdCerrarYSalir.setMnemonic(KeyEvent.VK_J);
        this.cmdSalir.setMnemonic(KeyEvent.VK_R);
        this.cmdNuevo.setMnemonic(KeyEvent.VK_N);
        this.txtSaldoCaja.setText(CNumeros.Formato(configuraciones.getInstance().getDiario().getValor()));
        this.lblLogo.setIcon(icono);
        setTitle("Sistema Ventas " + configuraciones.getInstance().getConfiguracion().getNombreLocal());
        this.lblLocal.setText(configuraciones.getInstance().getConfiguracion().getNombreLocal());
        this.lblDireccion.setText("Direccion: " + configuraciones.getInstance().getConfiguracion().getDireccion());
        this.lblTelefono.setText("Telefono: " + configuraciones.getInstance().getConfiguracion().getTelefono());
        this.lblPropietario.setText("Propietario: " + configuraciones.getInstance().getConfiguracion().getNombreDuenio());
        this.lblUsuario.setText("Usuario: " + configuraciones.getInstance().getUsuario().getNick());
        sucursales = sm.listarSucursals();

        cboSucursal.setSelectedItem(configuraciones.getInstance().getSucursal());
        if (configuraciones.getInstance().getUsuario().getRol().intValue() == 2) {
            this.mnuMantenimientos.setVisible(true);
            this.mnuMantenimientoSucursales.setVisible(false);
            this.mnuManArticulos.setVisible(false);
            this.mnuManProveedores.setVisible(false);
            this.mnuFacturas.setVisible(true);
            this.mnuProformas.setVisible(true);
            this.mnuServicios.setVisible(true);
            this.mnuSistema.setVisible(true);
            this.mnuReportes.setVisible(true);
            this.mnuStock.setVisible(false);
            this.mnuStockMinimo.setVisible(false);
            this.mnuRepVentasCliente.setVisible(true);
            this.mnuRepVentasFechas.setVisible(false);
            this.mnuCajaDiariaUsuario.setVisible(false);
//            this.mnuRepDeudas.setVisible(true);
            this.mnuDeaudasAProveedores.setVisible(false);
            this.mnuAjustes.setVisible(false);
            this.mnuRespaldar.setVisible(false);
            this.mnuUsuarios.setVisible(false);
            this.mnuReindexar.setVisible(true);
            this.mnuTransferir.setVisible(false);
            this.mnuHistorial.setVisible(false);
            this.mnuReporteTransferencias.setVisible(false);
            cboSucursal.addItem(configuraciones.getInstance().getSucursal().getNombre());
            cboSucursal.setEditable(false);
            cboSucursal.setEnabled(false);
            this.mnuCompras.setVisible(false);
            this.mnuRegistrarCompra.setVisible(false);
            
        } else if (configuraciones.getInstance().getUsuario().getRol() == 0) {

            cboSucursal.addItem(configuraciones.getInstance().getSucursal().getNombre());
            this.mnuMantenimientoSucursales.setVisible(false);
            this.mnuUsuarios.setVisible(false);
            this.mnuTransferir.setVisible(false);           
            this.mnuCompras.setVisible(false);
            this.mnuRegistrarCompra.setVisible(false);
            this.mnuDeaudasAProveedores.setVisible(false);
            cboSucursal.setEditable(false);
            cboSucursal.setEnabled(false);
        } else {
            for (int i = 0; i < sucursales.size(); i++) {
                cboSucursal.addItem(sucursales.get(i).getNombre());
            }
            cboSucursal.setSelectedItem(configuraciones.getInstance().getSucursal().getNombre());
        }
        if(!configuraciones.getInstance().getConfiguracion().getNotificacionActualizacion())
        {
            Actializacion actualizacion = new ActualizacionManager().recuperaUltimaActualizacion();
            if(actualizacion!=null)
            {
                actualizacion.setDescripcion(actualizacion.getDescripcion().replace('&', '\n'));
                JOptionPane.showMessageDialog(null, "CAMBIOS REALIZADOS:\n"+actualizacion.getDescripcion(),"Actualización recibida",JOptionPane.INFORMATION_MESSAGE);
                configuraciones.getInstance().getConfiguracion().setNotificacionActualizacion(true);
                try {
                    new ConfiguracionManager().guardarConfiguracion(configuraciones.getInstance().getConfiguracion());
                } catch (Exception ex) {
                    Logger.getLogger(VPrincipal.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuItem21 = new javax.swing.JMenuItem();
        jMenuItem18 = new javax.swing.JMenuItem();
        jLabel1 = new javax.swing.JLabel();
        txtBuscar = new javax.swing.JTextField();
        cmdBuscar = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        txtCedula = new javax.swing.JTextField();
        txtNombres = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        txtApellidos = new javax.swing.JTextField();
        txtDireccion = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtTelefono = new javax.swing.JTextField();
        txtEmail = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        cmdFacturar = new javax.swing.JButton();
        cmdProformar = new javax.swing.JButton();
        cmdNuevo = new javax.swing.JButton();
        cmdServicio = new javax.swing.JButton();
        pnlResultados = new javax.swing.JPanel();
        cmdUltimo = new javax.swing.JButton();
        cmdSiguiente = new javax.swing.JButton();
        cmdAnterior = new javax.swing.JButton();
        cmdPrimero = new javax.swing.JButton();
        lblEncontrados = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        lblLogo = new javax.swing.JLabel();
        lblLocal = new javax.swing.JLabel();
        lblTelefono = new javax.swing.JLabel();
        lblPropietario = new javax.swing.JLabel();
        lblDireccion = new javax.swing.JLabel();
        lblUsuario = new javax.swing.JLabel();
        cmdCerrarYSalir = new javax.swing.JButton();
        cmdSalir = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        txtSaldoCaja = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        cmdVerServicioTecnico = new javax.swing.JButton();
        txtServicioTecnico = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        cboSucursal = new javax.swing.JComboBox();
        CmdCambia = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuMantenimientos = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        mnuManArticulos = new javax.swing.JMenuItem();
        mnuManProveedores = new javax.swing.JMenuItem();
        mnuMantenimientoSucursales = new javax.swing.JMenuItem();
        mnuCompras = new javax.swing.JMenu();
        mnuRegistrarCompra = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        mnuSucursales = new javax.swing.JMenu();
        mnuBuscarSucursales = new javax.swing.JMenuItem();
        mnuTransferir = new javax.swing.JMenuItem();
        mnuReportes = new javax.swing.JMenu();
        mnuStockMinimo = new javax.swing.JMenuItem();
        mnuStock = new javax.swing.JMenuItem();
        mnuProformas = new javax.swing.JMenu();
        jMenuItem23 = new javax.swing.JMenuItem();
        jMenuItem11 = new javax.swing.JMenuItem();
        jMenuItem12 = new javax.swing.JMenuItem();
        mnuFacturas = new javax.swing.JMenu();
        mnuBuscarFacturaNumero = new javax.swing.JMenuItem();
        mnuBuscarFacturaCliente = new javax.swing.JMenuItem();
        cmdBuscarFacturaFecha = new javax.swing.JMenuItem();
        mnuServicios = new javax.swing.JMenu();
        jMenuItem24 = new javax.swing.JMenuItem();
        jMenuItem13 = new javax.swing.JMenuItem();
        jMenuItem10 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        mnuReporteTransferencias = new javax.swing.JMenu();
        mnuBuscarTransferenciaNumero = new javax.swing.JMenuItem();
        mnuBuscarTransferenciaUsuario = new javax.swing.JMenuItem();
        mnuBuscarTransferenciaFecha = new javax.swing.JMenuItem();
        mnuCajaDiariaUsuario = new javax.swing.JMenuItem();
        mnuRepVentasCliente = new javax.swing.JMenuItem();
        mnuRepVentasFechas = new javax.swing.JMenuItem();
        mnuHistorial = new javax.swing.JMenuItem();
        mnuDeudas = new javax.swing.JMenu();
        mnuDeaudasAProveedores = new javax.swing.JMenu();
        mnuDAPRegustrarDeuda = new javax.swing.JMenuItem();
        mnuDAPRegistrarPago = new javax.swing.JMenuItem();
        mnuDAPReporteDeudas = new javax.swing.JMenuItem();
        mnuDeudasDeClientes = new javax.swing.JMenu();
        mnuRegistrarDeudaCliente = new javax.swing.JMenuItem();
        mnuRegistrarPagoCliente = new javax.swing.JMenuItem();
        mnuReportesDeudasClientes = new javax.swing.JMenuItem();
        mnuCajaDiaria = new javax.swing.JMenu();
        jMenuItem16 = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem9 = new javax.swing.JMenuItem();
        mnuSistema = new javax.swing.JMenu();
        mnuAjustes = new javax.swing.JMenuItem();
        mnuUsuarios = new javax.swing.JMenuItem();
        mnuCambiarContrasenia = new javax.swing.JMenuItem();
        mnuReindexar = new javax.swing.JMenuItem();
        mnuRespaldar = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem22 = new javax.swing.JMenuItem();

        jMenuItem21.setText("jMenuItem21");

        jMenuItem18.setText("jMenuItem18");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sistema de Ventas ");
        setBackground(new java.awt.Color(204, 204, 204));
        setForeground(new java.awt.Color(204, 204, 204));

        jLabel1.setText("Cedula:");

        txtBuscar.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        txtBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtBuscarActionPerformed(evt);
            }
        });
        txtBuscar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtBuscarKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtBuscarKeyReleased(evt);
            }
        });

        cmdBuscar.setBackground(new java.awt.Color(153, 153, 153));
        cmdBuscar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        cmdBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/buscar.png"))); // NOI18N
        cmdBuscar.setText("        Buscar");
        cmdBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdBuscarActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(51, 51, 51));
        jLabel2.setText("Cedula/Ruc:");

        txtCedula.setEditable(false);

        txtNombres.setEditable(false);
        txtNombres.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNombresActionPerformed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(51, 51, 51));
        jLabel3.setText("Nombres:");

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(51, 51, 51));
        jLabel4.setText("Apellidos:");

        txtApellidos.setEditable(false);

        txtDireccion.setEditable(false);

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(51, 51, 51));
        jLabel5.setText("Direccion:");

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(51, 51, 51));
        jLabel6.setText("Telefono:");

        txtTelefono.setEditable(false);

        txtEmail.setEditable(false);

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(51, 51, 51));
        jLabel7.setText("Email:");

        cmdFacturar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        cmdFacturar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/factura2.png"))); // NOI18N
        cmdFacturar.setText("        FACTURAR");
        cmdFacturar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cmdFacturar.setEnabled(false);
        cmdFacturar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdFacturarActionPerformed(evt);
            }
        });

        cmdProformar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        cmdProformar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/factura3.png"))); // NOI18N
        cmdProformar.setText("   PROFORMAR");
        cmdProformar.setEnabled(false);
        cmdProformar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdProformarActionPerformed(evt);
            }
        });

        cmdNuevo.setBackground(new java.awt.Color(153, 153, 153));
        cmdNuevo.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        cmdNuevo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/new.png"))); // NOI18N
        cmdNuevo.setText("         Nuevo");
        cmdNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdNuevoActionPerformed(evt);
            }
        });

        cmdServicio.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        cmdServicio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/mantenimiento.png"))); // NOI18N
        cmdServicio.setText("SERVICIO TECNICO");
        cmdServicio.setEnabled(false);
        cmdServicio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdServicioActionPerformed(evt);
            }
        });

        pnlResultados.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));

        cmdUltimo.setText(">|");
        cmdUltimo.setEnabled(false);
        cmdUltimo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdUltimoActionPerformed(evt);
            }
        });

        cmdSiguiente.setText(">");
        cmdSiguiente.setEnabled(false);
        cmdSiguiente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdSiguienteActionPerformed(evt);
            }
        });

        cmdAnterior.setText("<");
        cmdAnterior.setEnabled(false);
        cmdAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdAnteriorActionPerformed(evt);
            }
        });

        cmdPrimero.setText("|<");
        cmdPrimero.setEnabled(false);
        cmdPrimero.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdPrimeroActionPerformed(evt);
            }
        });

        lblEncontrados.setText("Resultados Encontrados");

        javax.swing.GroupLayout pnlResultadosLayout = new javax.swing.GroupLayout(pnlResultados);
        pnlResultados.setLayout(pnlResultadosLayout);
        pnlResultadosLayout.setHorizontalGroup(
            pnlResultadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlResultadosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblEncontrados)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlResultadosLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(cmdPrimero)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cmdAnterior)
                .addGap(18, 18, 18)
                .addComponent(cmdSiguiente)
                .addGap(6, 6, 6)
                .addComponent(cmdUltimo)
                .addGap(24, 24, 24))
        );
        pnlResultadosLayout.setVerticalGroup(
            pnlResultadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlResultadosLayout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(lblEncontrados)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlResultadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cmdPrimero)
                    .addComponent(cmdAnterior)
                    .addComponent(cmdSiguiente)
                    .addComponent(cmdUltimo))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/1362567315_Phone.png"))); // NOI18N

        lblLocal.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        lblLocal.setForeground(new java.awt.Color(0, 0, 255));
        lblLocal.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblLocal.setText("jLabel9");

        lblTelefono.setText("jLabel9");

        lblPropietario.setText("jLabel10");

        lblDireccion.setText("jLabel11");

        lblUsuario.setText("jLabel9");

        cmdCerrarYSalir.setText("Cerrar Caja y Salir");
        cmdCerrarYSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdCerrarYSalirActionPerformed(evt);
            }
        });

        cmdSalir.setText("Salir");
        cmdSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdSalirActionPerformed(evt);
            }
        });

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(0, 0, 255));
        jLabel9.setText("SALDO CAJA:");

        txtSaldoCaja.setEditable(false);
        txtSaldoCaja.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        txtSaldoCaja.setForeground(new java.awt.Color(255, 0, 0));

        jLabel10.setText("Servicio Técnico:");

        cmdVerServicioTecnico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/buscar.png"))); // NOI18N
        cmdVerServicioTecnico.setText("Ver");
        cmdVerServicioTecnico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdVerServicioTecnicoActionPerformed(evt);
            }
        });

        jLabel11.setText("Sucursal Actual:");

        cboSucursal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cboSucursalActionPerformed(evt);
            }
        });

        CmdCambia.setText("Cambiar");
        CmdCambia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CmdCambiaActionPerformed(evt);
            }
        });

        jLabel12.setText("v 2.1.0");

        jMenuBar1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jMenuBar1.setForeground(new java.awt.Color(0, 0, 204));
        jMenuBar1.setMargin(new java.awt.Insets(0, 0, 0, 10));
        jMenuBar1.setPreferredSize(new java.awt.Dimension(95, 35));

        mnuMantenimientos.setText("Mantenimientos");
        mnuMantenimientos.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem1.setText("Clientes");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        mnuMantenimientos.add(jMenuItem1);

        mnuManArticulos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuManArticulos.setText("Articulos");
        mnuManArticulos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuManArticulosActionPerformed(evt);
            }
        });
        mnuMantenimientos.add(mnuManArticulos);

        mnuManProveedores.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuManProveedores.setText("Proveedores");
        mnuManProveedores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuManProveedoresActionPerformed(evt);
            }
        });
        mnuMantenimientos.add(mnuManProveedores);

        mnuMantenimientoSucursales.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuMantenimientoSucursales.setText("Sucursales");
        mnuMantenimientoSucursales.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuMantenimientoSucursalesActionPerformed(evt);
            }
        });
        mnuMantenimientos.add(mnuMantenimientoSucursales);

        jMenuBar1.add(mnuMantenimientos);

        mnuCompras.setText("Compras");

        mnuRegistrarCompra.setText("Registrar Compra");
        mnuRegistrarCompra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuRegistrarCompraActionPerformed(evt);
            }
        });
        mnuCompras.add(mnuRegistrarCompra);

        jMenuItem3.setText("Buscar por fecha");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        mnuCompras.add(jMenuItem3);

        jMenuItem5.setText("Buscar por proveedor");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        mnuCompras.add(jMenuItem5);

        jMenuItem4.setText("Reporte de compras por fechas");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        mnuCompras.add(jMenuItem4);

        jMenuBar1.add(mnuCompras);

        mnuSucursales.setText("Sucursales");

        mnuBuscarSucursales.setText("Buscar artículos en sucursales");
        mnuBuscarSucursales.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuBuscarSucursalesActionPerformed(evt);
            }
        });
        mnuSucursales.add(mnuBuscarSucursales);

        mnuTransferir.setText("Transferir artículos entre sucursales");
        mnuTransferir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuTransferirActionPerformed(evt);
            }
        });
        mnuSucursales.add(mnuTransferir);

        jMenuBar1.add(mnuSucursales);

        mnuReportes.setText("Reportes");

        mnuStockMinimo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuStockMinimo.setText("Stock Mínimo");
        mnuStockMinimo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuStockMinimoActionPerformed(evt);
            }
        });
        mnuReportes.add(mnuStockMinimo);

        mnuStock.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuStock.setText("Stock");
        mnuStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuStockActionPerformed(evt);
            }
        });
        mnuReportes.add(mnuStock);

        mnuProformas.setText("Proformas");

        jMenuItem23.setText("Buscar por Número");
        jMenuItem23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem23ActionPerformed(evt);
            }
        });
        mnuProformas.add(jMenuItem23);

        jMenuItem11.setText("Buscar por Cliente");
        jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem11ActionPerformed(evt);
            }
        });
        mnuProformas.add(jMenuItem11);

        jMenuItem12.setText("Buscar por Fecha");
        jMenuItem12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem12ActionPerformed(evt);
            }
        });
        mnuProformas.add(jMenuItem12);

        mnuReportes.add(mnuProformas);

        mnuFacturas.setText("Facturas");

        mnuBuscarFacturaNumero.setText("Buscar por Número");
        mnuBuscarFacturaNumero.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuBuscarFacturaNumeroActionPerformed(evt);
            }
        });
        mnuFacturas.add(mnuBuscarFacturaNumero);

        mnuBuscarFacturaCliente.setText("Buscar por Cliente");
        mnuBuscarFacturaCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuBuscarFacturaClienteActionPerformed(evt);
            }
        });
        mnuFacturas.add(mnuBuscarFacturaCliente);

        cmdBuscarFacturaFecha.setText("Buscar por Fecha");
        cmdBuscarFacturaFecha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdBuscarFacturaFechaActionPerformed(evt);
            }
        });
        mnuFacturas.add(cmdBuscarFacturaFecha);

        mnuReportes.add(mnuFacturas);

        mnuServicios.setText("Servicio Tecnico");

        jMenuItem24.setText("Buscar por Número");
        jMenuItem24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem24ActionPerformed(evt);
            }
        });
        mnuServicios.add(jMenuItem24);

        jMenuItem13.setText("Buscar por Cliente");
        jMenuItem13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem13ActionPerformed(evt);
            }
        });
        mnuServicios.add(jMenuItem13);

        jMenuItem10.setText("Buscar por Fecha");
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        mnuServicios.add(jMenuItem10);

        jMenuItem2.setText("Buscar por Serie");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        mnuServicios.add(jMenuItem2);

        mnuReportes.add(mnuServicios);

        mnuReporteTransferencias.setText("Transferencias");

        mnuBuscarTransferenciaNumero.setText("Buscar por Número");
        mnuBuscarTransferenciaNumero.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuBuscarTransferenciaNumeroActionPerformed(evt);
            }
        });
        mnuReporteTransferencias.add(mnuBuscarTransferenciaNumero);

        mnuBuscarTransferenciaUsuario.setText("Buscar por Usuario");
        mnuBuscarTransferenciaUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuBuscarTransferenciaUsuarioActionPerformed(evt);
            }
        });
        mnuReporteTransferencias.add(mnuBuscarTransferenciaUsuario);

        mnuBuscarTransferenciaFecha.setText("Buscar por Fecha");
        mnuBuscarTransferenciaFecha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuBuscarTransferenciaFechaActionPerformed(evt);
            }
        });
        mnuReporteTransferencias.add(mnuBuscarTransferenciaFecha);

        mnuReportes.add(mnuReporteTransferencias);

        mnuCajaDiariaUsuario.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuCajaDiariaUsuario.setText("Caja Diaria Usuario");
        mnuCajaDiariaUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuCajaDiariaUsuarioActionPerformed(evt);
            }
        });
        mnuReportes.add(mnuCajaDiariaUsuario);

        mnuRepVentasCliente.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuRepVentasCliente.setText("Reporte Ventas por Cliente");
        mnuRepVentasCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuRepVentasClienteActionPerformed(evt);
            }
        });
        mnuReportes.add(mnuRepVentasCliente);

        mnuRepVentasFechas.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuRepVentasFechas.setText("Reporte Ventas Fecha");
        mnuRepVentasFechas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuRepVentasFechasActionPerformed(evt);
            }
        });
        mnuReportes.add(mnuRepVentasFechas);

        mnuHistorial.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuHistorial.setText("Historial de un Número de Serie");
        mnuHistorial.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuHistorialActionPerformed(evt);
            }
        });
        mnuReportes.add(mnuHistorial);

        jMenuBar1.add(mnuReportes);

        mnuDeudas.setText("Deudas");

        mnuDeaudasAProveedores.setText("Deudas a Proveedores");

        mnuDAPRegustrarDeuda.setText("Registrar Deuda");
        mnuDAPRegustrarDeuda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuDAPRegustrarDeudaActionPerformed(evt);
            }
        });
        mnuDeaudasAProveedores.add(mnuDAPRegustrarDeuda);

        mnuDAPRegistrarPago.setText("Registrar Pago");
        mnuDAPRegistrarPago.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuDAPRegistrarPagoActionPerformed(evt);
            }
        });
        mnuDeaudasAProveedores.add(mnuDAPRegistrarPago);

        mnuDAPReporteDeudas.setText("Reporte de Deudas");
        mnuDAPReporteDeudas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuDAPReporteDeudasActionPerformed(evt);
            }
        });
        mnuDeaudasAProveedores.add(mnuDAPReporteDeudas);

        mnuDeudas.add(mnuDeaudasAProveedores);

        mnuDeudasDeClientes.setText("Deudas de Clientes");

        mnuRegistrarDeudaCliente.setText("Registrar Deuda");
        mnuRegistrarDeudaCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuRegistrarDeudaClienteActionPerformed(evt);
            }
        });
        mnuDeudasDeClientes.add(mnuRegistrarDeudaCliente);

        mnuRegistrarPagoCliente.setText("Registrar Pago");
        mnuRegistrarPagoCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuRegistrarPagoClienteActionPerformed(evt);
            }
        });
        mnuDeudasDeClientes.add(mnuRegistrarPagoCliente);

        mnuReportesDeudasClientes.setText("Reporte de Deudas");
        mnuReportesDeudasClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuReportesDeudasClientesActionPerformed(evt);
            }
        });
        mnuDeudasDeClientes.add(mnuReportesDeudasClientes);

        mnuDeudas.add(mnuDeudasDeClientes);

        jMenuBar1.add(mnuDeudas);

        mnuCajaDiaria.setText("Caja");

        jMenuItem16.setText("Ver Caja Diaria");
        jMenuItem16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem16ActionPerformed(evt);
            }
        });
        mnuCajaDiaria.add(jMenuItem16);

        jMenu1.setText("Gastos");

        jMenuItem9.setText("Registrar Gasto");
        jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem9ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem9);

        mnuCajaDiaria.add(jMenu1);

        jMenuBar1.add(mnuCajaDiaria);

        mnuSistema.setText("Sistema");

        mnuAjustes.setText("Ajustes");
        mnuAjustes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuAjustesActionPerformed(evt);
            }
        });
        mnuSistema.add(mnuAjustes);

        mnuUsuarios.setText("Usuarios");
        mnuUsuarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuUsuariosActionPerformed(evt);
            }
        });
        mnuSistema.add(mnuUsuarios);

        mnuCambiarContrasenia.setText("Cambiar contraseña de Usuario");
        mnuCambiarContrasenia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuCambiarContraseniaActionPerformed(evt);
            }
        });
        mnuSistema.add(mnuCambiarContrasenia);

        mnuReindexar.setText("Reindexar Datos");
        mnuReindexar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuReindexarActionPerformed(evt);
            }
        });
        mnuSistema.add(mnuReindexar);

        mnuRespaldar.setText("Respaldar Base de Datos");
        mnuRespaldar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuRespaldarActionPerformed(evt);
            }
        });
        mnuSistema.add(mnuRespaldar);

        jMenuItem6.setText("A cerca de");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        mnuSistema.add(jMenuItem6);

        jMenuBar1.add(mnuSistema);

        jMenu2.setText("Impresora");

        jMenuItem22.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem22.setText("Limpiar ");
        jMenuItem22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem22ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem22);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSeparator1)
                .addGap(10, 10, 10))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(78, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtBuscar)
                                .addGap(10, 10, 10)
                                .addComponent(cmdBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(cmdNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(cmdFacturar, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(cmdProformar, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(cmdCerrarYSalir)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(cmdSalir)))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(lblUsuario)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(CmdCambia))
                                    .addComponent(cmdServicio)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel10)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtServicioTecnico, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cmdVerServicioTecnico)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel9)
                                .addGap(18, 18, 18)
                                .addComponent(txtSaldoCaja, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(25, 25, 25)
                        .addComponent(jLabel12))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlResultados, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel4)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel6)
                                    .addComponent(jLabel7))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(txtEmail, javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(txtTelefono, javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(txtApellidos, javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(txtNombres, javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(txtCedula, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(32, 32, 32)
                        .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(73, 73, 73))))
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel11)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cboSucursal, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(lblLogo)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(59, 59, 59)
                        .addComponent(lblDireccion)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblTelefono)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblPropietario)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblLocal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(cboSucursal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblLogo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblLocal)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblDireccion)
                            .addComponent(lblTelefono)
                            .addComponent(lblPropietario))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cmdNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cmdBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel1)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtCedula, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2))
                        .addGap(15, 15, 15)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNombres, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtApellidos, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7))
                        .addGap(18, 18, 18)
                        .addComponent(pnlResultados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel8)
                        .addGap(44, 44, 44)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cmdProformar, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmdServicio)
                    .addComponent(cmdFacturar, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblUsuario)
                    .addComponent(cmdCerrarYSalir)
                    .addComponent(cmdSalir)
                    .addComponent(CmdCambia))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(9, 9, 9)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(txtServicioTecnico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cmdVerServicioTecnico)))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(txtSaldoCaja)
                                .addGap(2, 2, 2)))
                        .addGap(8, 8, 8)
                        .addComponent(jLabel12)))
                .addGap(29, 29, 29))
        );

        setSize(new java.awt.Dimension(725, 705));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void mnuManProveedoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuManProveedoresActionPerformed
        // TODO add your handling code here:
        VMantenimientoProveedores.getInstance().setVisible(true);
    }//GEN-LAST:event_mnuManProveedoresActionPerformed

    private void txtNombresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNombresActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtNombresActionPerformed

    private void cmdBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdBuscarActionPerformed
        // TODO add your handling code here:
        ClienteManager cm = new ClienteManager();
        if(txtBuscar.getText().equals("0"))
        {
            txtBuscar.setText("0000000000");
        }
        cliente = cm.buscarPorCedula(txtBuscar.getText());
        if(cliente!=null)
        {
            cmdNuevo.setText("Modificar");
            llenaTextos(cliente);
            cmdFacturar.setEnabled(true);
            cmdProformar.setEnabled(true);
            cmdServicio.setEnabled(true);
            
        }
        else{
            cmdNuevo.setText("Nuevo");
            txtCedula.setText("");
            txtNombres.setText("");
            txtApellidos.setText("");
            txtDireccion.setText("");
            txtTelefono.setText("");
            txtEmail.setText("");
            habilitaControles(false);
            cmdFacturar.setEnabled(false);
            cmdProformar.setEnabled(false);
            cmdServicio.setEnabled(false);
        }/*
        listaClientes = cm.listarClientes(txtBuscar.getText());
        lblEncontrados.setText("Resultados encontrados: " + listaClientes.size());
        if (listaClientes.size() > 0) {
            cmdNuevo.setText("Modificar");
            llenaTextos(0);
            cmdFacturar.setEnabled(true);
            cmdProformar.setEnabled(true);
            cmdServicio.setEnabled(true);
            if (listaClientes.size() > 1) {
                cmdSiguiente.setEnabled(true);
                cmdUltimo.setEnabled(true);
            } else {
                habilitaControles(false);
            }
        } else {
            cmdNuevo.setText("Nuevo");
            txtCedula.setText("");
            txtNombres.setText("");
            txtApellidos.setText("");
            txtDireccion.setText("");
            txtTelefono.setText("");
            txtEmail.setText("");
            habilitaControles(false);
            cmdFacturar.setEnabled(false);
            cmdProformar.setEnabled(false);
            cmdServicio.setEnabled(false);
        }*/

    }//GEN-LAST:event_cmdBuscarActionPerformed

    private void cmdPrimeroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdPrimeroActionPerformed
        // TODO add your handling code here:
        i = 0;
        llenaTextos(0);
        cambiaDesplazamientos(false);
    }//GEN-LAST:event_cmdPrimeroActionPerformed

    private void cmdUltimoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdUltimoActionPerformed
        // TODO add your handling code here:
        i = listaClientes.size() - 1;
        llenaTextos(i);
        cambiaDesplazamientos(true);
    }//GEN-LAST:event_cmdUltimoActionPerformed

    private void cmdAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdAnteriorActionPerformed
        // TODO add your handling code here:
        if (i > 0) {
            i = i - 1;
            llenaTextos(i);
            if (i == 0) {
                cambiaDesplazamientos(false);
            } else if (i < listaClientes.size() - 1) {
                habilitaControles(true);
            }
        }
    }//GEN-LAST:event_cmdAnteriorActionPerformed

    private void cmdSiguienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdSiguienteActionPerformed
        // TODO add your handling code here:
        if (i < listaClientes.size() - 1) {
            i = i + 1;
            llenaTextos(i);
            if (i == listaClientes.size() - 1) {
                cambiaDesplazamientos(true);
            } else if (i > 0) {
                habilitaControles(true);
            }
        }
    }//GEN-LAST:event_cmdSiguienteActionPerformed

    private void cmdFacturarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdFacturarActionPerformed
        // TODO add your handling code here:
        new VFactura(cliente).setVisible(true);
    }//GEN-LAST:event_cmdFacturarActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        VMantenimientoCliente.getInstance().show();
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void mnuManArticulosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuManArticulosActionPerformed
        // TODO add your handling code here:
        VMantenimientoArticulos.getInstance().show();

    }//GEN-LAST:event_mnuManArticulosActionPerformed

    private void cmdNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdNuevoActionPerformed
        // TODO add your handling code here:
        if (listaClientes == null || listaClientes.isEmpty()) {
            new VNuevoCliente(txtBuscar.getText(), cmdBuscar).setVisible(true);
        } else {
            new VNuevoCliente(listaClientes.get(i), cmdBuscar).show();
        }
    }//GEN-LAST:event_cmdNuevoActionPerformed

    private void cmdProformarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdProformarActionPerformed
        // TODO add your handling code here:
        new VProforma(cliente).setVisible(true);
    }//GEN-LAST:event_cmdProformarActionPerformed

    private void txtBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtBuscarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtBuscarActionPerformed

    private void txtBuscarKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtBuscarKeyPressed
        // TODO add your handling code here:
        if (evt.getKeyCode() == 10) {
            cmdBuscar.doClick();
        }
    }//GEN-LAST:event_txtBuscarKeyPressed

    private void cmdServicioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdServicioActionPerformed
        // TODO add your handling code here:
        new VServicioTecnico(cliente).setVisible(true);
    }//GEN-LAST:event_cmdServicioActionPerformed

    private void mnuStockMinimoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuStockMinimoActionPerformed
        // TODO add your handling code here:
        new VSeleccionArticulo(1).setVisible(true);
    }//GEN-LAST:event_mnuStockMinimoActionPerformed

    private void mnuStockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuStockActionPerformed
        // TODO add your handling code here:
        new VSeleccionArticulo(2).setVisible(true);
    }//GEN-LAST:event_mnuStockActionPerformed

    private void mnuBuscarFacturaClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuBuscarFacturaClienteActionPerformed
        // TODO add your handling code here:
        String ced = JOptionPane.showInputDialog(rootPane, "Ingrese el numero de cedula o ruc del cliente a buscar", "Buscar Factura", JOptionPane.INFORMATION_MESSAGE);
        if (ced != null) {
            List<Factura> listaFacturas;
            listaFacturas = new FacturaManager().buscarPorCedula(ced);
            if (listaFacturas != null && listaFacturas.size() > 0) {
                new VBuscarPorCliente(listaFacturas).setVisible(true);
            } else {
                JOptionPane.showMessageDialog(rootPane, "No se han encontrado facturas de este cliente", "Buscar Factura", JOptionPane.INFORMATION_MESSAGE);
            }
        }
    }//GEN-LAST:event_mnuBuscarFacturaClienteActionPerformed

    private void jMenuItem13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem13ActionPerformed
        // TODO add your handling code here:
        String ced = JOptionPane.showInputDialog(rootPane, "Ingrese el numero de cedula o ruc del cliente a buscar", "Buscar Servcio Técnico", JOptionPane.INFORMATION_MESSAGE);
        if (ced != null) {
            List<Serviciotecnico> listaServicios;
            listaServicios = new ServicioTecnicoManager().buscarPorCedula(ced);
            if (listaServicios != null && listaServicios.size() > 0) {
                new VBuscarPorCliente(listaServicios, 1, 0).setVisible(true);
            } else {
                JOptionPane.showMessageDialog(rootPane, "No se han encontrado facturas de este cliente", "Buscar Servicio Técnico", JOptionPane.INFORMATION_MESSAGE);
            }
        }
    }//GEN-LAST:event_jMenuItem13ActionPerformed

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        // TODO add your handling code here:
        new VBuscarFacturaFecha(2).show();
    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void mnuBuscarFacturaNumeroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuBuscarFacturaNumeroActionPerformed
        // TODO add your handling code here:
        String num = JOptionPane.showInputDialog(rootPane, "Ingrese el numero de factura a buscar", "Buscar Factura", JOptionPane.INFORMATION_MESSAGE);
        if (num != null) {
            int numero;
            try {
                numero = Integer.parseInt(num);

            } catch (Exception e) {
                JOptionPane.showMessageDialog(rootPane, "Ingrese un numero de Factura", "Error", JOptionPane.ERROR_MESSAGE);
                return;
            }
            FacturaManager fm = new FacturaManager();
            Factura factura = fm.buscarPorNumero(numero, configuraciones.getInstance().getSucursal());
            if (factura != null) {
                new VVerFactura(factura).show();
            } else {
                JOptionPane.showMessageDialog(rootPane, "No se encontró una factura con ese número", "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    }//GEN-LAST:event_mnuBuscarFacturaNumeroActionPerformed

    private void cmdBuscarFacturaFechaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdBuscarFacturaFechaActionPerformed
        // TODO add your handling code here:
        new VBuscarFacturaFecha().show();
    }//GEN-LAST:event_cmdBuscarFacturaFechaActionPerformed

    private void mnuAjustesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuAjustesActionPerformed
        // TODO add your handling code here:
        new VConfiguracionSis().show();
    }//GEN-LAST:event_mnuAjustesActionPerformed

    private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem11ActionPerformed
        // TODO add your handling code here:
        String ced = JOptionPane.showInputDialog(rootPane, "Ingrese el numero de cedula o ruc del cliente a buscar", "Buscar Proforma", JOptionPane.INFORMATION_MESSAGE);
        if (ced != null) {
            List<Proforma> listaProformas;
            listaProformas = new ProformaManager().buscarPorCedula(ced);
            if (listaProformas != null && listaProformas.size() > 0) {
                new VBuscarPorCliente(listaProformas, 2).setVisible(true);
            } else {
                JOptionPane.showMessageDialog(rootPane, "No se han encontrado proformas de este cliente", "Buscar Proforma", JOptionPane.INFORMATION_MESSAGE);

            }
        }
    }//GEN-LAST:event_jMenuItem11ActionPerformed

    private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem12ActionPerformed
        // TODO add your handling code here:
        new VBuscarFacturaFecha(1).show();
    }//GEN-LAST:event_jMenuItem12ActionPerformed

    private void mnuUsuariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuUsuariosActionPerformed
        // TODO add your handling code here:
        if (configuraciones.getInstance().getUsuario().getRol() != 2) {
            new VUsuarios().show();
        } else {
            JOptionPane.showMessageDialog(rootPane, "Solo los administradores pueden gestionar los usuarios");
        }
    }//GEN-LAST:event_mnuUsuariosActionPerformed

    private void mnuReindexarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuReindexarActionPerformed
        // TODO add your handling code here:
        try {
            new GenericController().indexarPrimeraVez();
            JOptionPane.showMessageDialog(rootPane, "Completado");
        } catch (Exception e) {
        }
    }//GEN-LAST:event_mnuReindexarActionPerformed

    private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem9ActionPerformed
        // TODO add your handling code here:
        new VRegistrarGasto().show();
    }//GEN-LAST:event_jMenuItem9ActionPerformed

    private void cmdCerrarYSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdCerrarYSalirActionPerformed
        // TODO add your handling code here:
        if (JOptionPane.showConfirmDialog(rootPane, "Está seguro de cerrar caja?", "Cerrar Caja", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
            DiarioManager dm = new DiarioManager();
            dm.cierraDiario(configuraciones.getInstance().getDiario());
            JOptionPane.showMessageDialog(rootPane, "Se cierra caja con: " + CNumeros.Formato(configuraciones.getInstance().getDiario().getValor()) + " dólares");
            ReportePDF reporte = new ReportePDF();
            new CImprimir().imprimirCierreDeCaja();
            try {
                reporte.ReporteCaja(configuraciones.getInstance().getUsuario(), new Date());
            } catch (JRException ex) {
                //      Logger.getLogger(VVerCajaUsuario.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.exit(0);

        }
    }//GEN-LAST:event_cmdCerrarYSalirActionPerformed

    private void cmdSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdSalirActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_cmdSalirActionPerformed

    private void jMenuItem16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem16ActionPerformed
        // TODO add your handling code here:
        new VVerCajaDiaria().show();

    }//GEN-LAST:event_jMenuItem16ActionPerformed

    private void mnuCajaDiariaUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuCajaDiariaUsuarioActionPerformed
        // TODO add your handling code here:
        VVerCajaUsuario.getInstance().show();
    }//GEN-LAST:event_mnuCajaDiariaUsuarioActionPerformed

    private void mnuRepVentasClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuRepVentasClienteActionPerformed
        // TODO add your handling code here:
        String cedula = JOptionPane.showInputDialog("Ingrese la cedula del cliente");
        if (cedula != null) {
            Cliente cli = new ClienteManager().buscarPorCedula(cedula);
            if (cli == null) {
                JOptionPane.showMessageDialog(rootPane, "No existe el cliente");
                return;
            } else {
                ReportePDF rep = new ReportePDF();
                try {
                    rep.ReporteFacturaProforma(cli);
                } catch (JRException ex) {
                    Logger.getLogger(VPrincipal.class.getName()).log(Level.SEVERE, null, ex);
                }
            }

        }

    }//GEN-LAST:event_mnuRepVentasClienteActionPerformed

    private void mnuRespaldarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuRespaldarActionPerformed
        // TODO add your handling code here:
        String path;
        Date d = new Date();

        String fecha = d.getDate() + "_" + (d.getMonth() + 1) + "_" + (d.getYear() + 1900);
        path = "C:/celulares/basedatos" + fecha + ".sql";
        /*
         if (new DBRestore().backupDB(configuraciones.pathBase, "celulares", "root", configuraciones.claveBase, path)) {
         JOptionPane.showMessageDialog(rootPane, "Completado");
         } else {
         JOptionPane.showMessageDialog(rootPane, "No se pudo respaldar la base de datos");
         }*/
    }//GEN-LAST:event_mnuRespaldarActionPerformed

    private void mnuRepVentasFechasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuRepVentasFechasActionPerformed
        // TODO add your handling code here:
        new VSelecFechaRprVenta().setVisible(true);

    }//GEN-LAST:event_mnuRepVentasFechasActionPerformed

    private void jMenuItem22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem22ActionPerformed
        // TODO add your handling code here:
        //new CImprimir().limpiarImpresora();

    }//GEN-LAST:event_jMenuItem22ActionPerformed

    private void jMenuItem23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem23ActionPerformed
        // TODO add your handling code here:
        String num = JOptionPane.showInputDialog(rootPane, "Ingrese el numero de proforma a buscar", "Buscar Proforma", JOptionPane.INFORMATION_MESSAGE);
        if (num != null) {
            int numero;
            try {
                numero = Integer.parseInt(num);

            } catch (Exception e) {
                JOptionPane.showMessageDialog(rootPane, "Ingrese un numero de Proforma", "Error", JOptionPane.ERROR_MESSAGE);
                return;
            }
            ProformaManager pm = new ProformaManager();
            Proforma proforma = pm.buscarPorNumero(numero);
            if (proforma != null) {
                new VVerProforma(proforma).show();
            } else {
                JOptionPane.showMessageDialog(rootPane, "No se encontró una proforma con ese número", "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    }//GEN-LAST:event_jMenuItem23ActionPerformed

    private void jMenuItem24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem24ActionPerformed
        // TODO add your handling code here:
        String num = JOptionPane.showInputDialog(rootPane, "Ingrese el numero de servicio tecnico a buscar", "Buscar Servicio Tecnico", JOptionPane.INFORMATION_MESSAGE);
        if (num != null) {
            int numero;
            try {
                numero = Integer.parseInt(num);

            } catch (Exception e) {
                JOptionPane.showMessageDialog(rootPane, "Ingrese un numero de servicio tecnico", "Error", JOptionPane.ERROR_MESSAGE);
                return;
            }
            Serviciotecnico st = new ServicioTecnicoManager().buscarServicioTecnicoPorNumero(numero);
            if (st != null) {
                new VServicioTecnico(st).show();
            } else {
                JOptionPane.showMessageDialog(rootPane, "No se encontró un servicio técnico con ese número");
                return;
            }
        }
    }//GEN-LAST:event_jMenuItem24ActionPerformed

    private void cmdVerServicioTecnicoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdVerServicioTecnicoActionPerformed
        // TODO add your handling code here:
        try {
            Integer.parseInt(txtServicioTecnico.getText());
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Campo Servicio Técnico Erroneo");
        }
        Serviciotecnico serv = new ServicioTecnicoManager().buscarServicioTecnicoPorNumero(Integer.parseInt(txtServicioTecnico.getText()));
        if (serv != null) {
            new VServicioTecnico(serv).show();
        } else {
            JOptionPane.showMessageDialog(this.rootPane, "No se encontró un servicio tecnico con ese número");
        }
    }//GEN-LAST:event_cmdVerServicioTecnicoActionPerformed

    private void txtBuscarKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtBuscarKeyReleased
        // TODO add your handling code here:
        //new Validacion().numeros(evt, txtBuscar);
    }//GEN-LAST:event_txtBuscarKeyReleased

    private void mnuMantenimientoSucursalesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuMantenimientoSucursalesActionPerformed
        // TODO add your handling code here:
        VMantenimientoSucursales.getInstance().show();
    }//GEN-LAST:event_mnuMantenimientoSucursalesActionPerformed

    private void mnuBuscarSucursalesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuBuscarSucursalesActionPerformed
        // TODO add your handling code here:
        new VBuscarArticuloSucursales().show();
    }//GEN-LAST:event_mnuBuscarSucursalesActionPerformed

    private void mnuTransferirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuTransferirActionPerformed
        // TODO add your handling code here:
        new VSeleccionSucursales().show();
    }//GEN-LAST:event_mnuTransferirActionPerformed

    private void cboSucursalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboSucursalActionPerformed
        // TODO add your handling code here:
        if (evt.getModifiers() == 16) {
            if (cboSucursal.getSelectedItem() != null && String.valueOf(cboSucursal.getSelectedItem()).length() > 0) {
                //JOptionPane.showMessageDialog(rootPane, cboSucursal.getSelectedItem());
                Sucursal sucursal = sm.buscarPorNombre(cboSucursal.getSelectedItem().toString());
                if (sucursal != null) {
                    configuraciones.getInstance().setSucursal(sucursal);
                    VMantenimientoArticulos.getInstance().actualizaStocks();
                } else {
                    JOptionPane.showMessageDialog(rootPane, "Error al asignar sucursal");
                }

            }

        } else {
            cboSucursal.setSelectedItem(configuraciones.getInstance().getSucursal().getNombre());
        }
    }//GEN-LAST:event_cboSucursalActionPerformed

    private void CmdCambiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CmdCambiaActionPerformed
        // TODO add your handling code here:
        new VLoggin().show();
        instance = null;
        this.dispose();
    }//GEN-LAST:event_CmdCambiaActionPerformed

    private void mnuRegistrarCompraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuRegistrarCompraActionPerformed
        // TODO add your handling code here:
        new VFacturaCompra().show();
    }//GEN-LAST:event_mnuRegistrarCompraActionPerformed

    private void mnuHistorialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuHistorialActionPerformed
        // TODO add your handling code here:
        new VBuscarSerie().show();
    }//GEN-LAST:event_mnuHistorialActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        new VBuscarSevicioSerie().show();
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        new VBuscarFacturaFecha(3).show();
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
        new VSelecFechaRepCompras().show();
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        // TODO add your handling code here:
        new VBuscarComprasProveedor().show();
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        // TODO add your handling code here:
        new VCreditos().show();
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void mnuBuscarTransferenciaNumeroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuBuscarTransferenciaNumeroActionPerformed
        // TODO add your handling code here:
        String num = JOptionPane.showInputDialog(rootPane, "Ingrese el número de transferencia a buscar", "Buscar Transferencia", JOptionPane.INFORMATION_MESSAGE);
        if (num != null) {
            int numero;
            try {
                numero = Integer.parseInt(num);

            } catch (Exception e) {
                JOptionPane.showMessageDialog(rootPane, "Ingrese un número de transferencia", "Error", JOptionPane.ERROR_MESSAGE);
                return;
            }
            Transferencia trans = new TransferenciaManager().buscarTransferenciaNumero(numero);
            if (trans != null) {
                new VVerTransferencia(trans).show();
            } else {
                JOptionPane.showMessageDialog(rootPane, "No se encontró una transferencia con ese número");
                return;
            }
        }
    }//GEN-LAST:event_mnuBuscarTransferenciaNumeroActionPerformed

    private void mnuBuscarTransferenciaFechaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuBuscarTransferenciaFechaActionPerformed
        // TODO add your handling code here:
        new VBuscarFacturaFecha(4).show();
    }//GEN-LAST:event_mnuBuscarTransferenciaFechaActionPerformed

    private void mnuBuscarTransferenciaUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuBuscarTransferenciaUsuarioActionPerformed
        // TODO add your handling code here:
        new VBuscarTransferenciaPorUsuario().show();
    }//GEN-LAST:event_mnuBuscarTransferenciaUsuarioActionPerformed

    private void mnuDAPRegustrarDeudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuDAPRegustrarDeudaActionPerformed
        // TODO add your handling code here:
        new VRegistrarDeudaProveedor().show();
    }//GEN-LAST:event_mnuDAPRegustrarDeudaActionPerformed

    private void mnuDAPRegistrarPagoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuDAPRegistrarPagoActionPerformed
        // TODO add your handling code here:
        new VSeleccionProveedorPagoDeuda().show();
    }//GEN-LAST:event_mnuDAPRegistrarPagoActionPerformed

    private void mnuDAPReporteDeudasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuDAPReporteDeudasActionPerformed
        // TODO add your handling code here:
        new VReporteDeudasProveedor().show();
    }//GEN-LAST:event_mnuDAPReporteDeudasActionPerformed

    private void mnuRegistrarDeudaClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuRegistrarDeudaClienteActionPerformed
        // TODO add your handling code here:
        new VRegistrarDeudaCliente().show();
    }//GEN-LAST:event_mnuRegistrarDeudaClienteActionPerformed

    private void mnuRegistrarPagoClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuRegistrarPagoClienteActionPerformed
        // TODO add your handling code here:
        new VSeleccionClientePagoDeuda().show();
    }//GEN-LAST:event_mnuRegistrarPagoClienteActionPerformed

    private void mnuReportesDeudasClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuReportesDeudasClientesActionPerformed
        // TODO add your handling code here:
        new VReporteDeudasClientes().show();
    }//GEN-LAST:event_mnuReportesDeudasClientesActionPerformed

    private void mnuCambiarContraseniaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuCambiarContraseniaActionPerformed
        // TODO add your handling code here:
        new VCambiarPassword().show();
    }//GEN-LAST:event_mnuCambiarContraseniaActionPerformed
    private void llenaTextos(int i) {
        txtCedula.setText(listaClientes.get(i).getCedula());
        txtNombres.setText(listaClientes.get(i).getNombres());
        txtApellidos.setText(listaClientes.get(i).getApellidos());
        txtDireccion.setText(listaClientes.get(i).getDireccion());
        txtTelefono.setText(listaClientes.get(i).getTelefono());
        txtEmail.setText(listaClientes.get(i).getEmail());
    }
    private void llenaTextos(Cliente cliente) {
        txtCedula.setText(cliente.getCedula());
        txtNombres.setText(cliente.getNombres());
        txtApellidos.setText(cliente.getApellidos());
        txtDireccion.setText(cliente.getDireccion());
        txtTelefono.setText(cliente.getTelefono());
        txtEmail.setText(cliente.getEmail());
    }
    private void habilitaControles(boolean estado) {
        cmdAnterior.setEnabled(estado);
        cmdPrimero.setEnabled(estado);
        cmdSiguiente.setEnabled(estado);
        cmdUltimo.setEnabled(estado);
    }

    private void cambiaDesplazamientos(boolean estado) {
        cmdAnterior.setEnabled(estado);
        cmdPrimero.setEnabled(estado);
        cmdSiguiente.setEnabled(!estado);
        cmdUltimo.setEnabled(!estado);

    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;

                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VPrincipal.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VPrincipal.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VPrincipal.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VPrincipal.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            System.out.println("Error setting native LAF: " + e);
        }
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new VPrincipal().setVisible(true);
            }
        });
    }

    public void cambiaCaja(double saldo) {
        txtSaldoCaja.setText(String.valueOf(CNumeros.Formato(saldo)));
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton CmdCambia;
    private javax.swing.JComboBox cboSucursal;
    private javax.swing.JButton cmdAnterior;
    private javax.swing.JButton cmdBuscar;
    private javax.swing.JMenuItem cmdBuscarFacturaFecha;
    private javax.swing.JButton cmdCerrarYSalir;
    private javax.swing.JButton cmdFacturar;
    private javax.swing.JButton cmdNuevo;
    private javax.swing.JButton cmdPrimero;
    private javax.swing.JButton cmdProformar;
    private javax.swing.JButton cmdSalir;
    private javax.swing.JButton cmdServicio;
    private javax.swing.JButton cmdSiguiente;
    private javax.swing.JButton cmdUltimo;
    private javax.swing.JButton cmdVerServicioTecnico;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenuItem jMenuItem12;
    private javax.swing.JMenuItem jMenuItem13;
    private javax.swing.JMenuItem jMenuItem16;
    private javax.swing.JMenuItem jMenuItem18;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem21;
    private javax.swing.JMenuItem jMenuItem22;
    private javax.swing.JMenuItem jMenuItem23;
    private javax.swing.JMenuItem jMenuItem24;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel lblDireccion;
    private javax.swing.JLabel lblEncontrados;
    private javax.swing.JLabel lblLocal;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JLabel lblPropietario;
    private javax.swing.JLabel lblTelefono;
    private javax.swing.JLabel lblUsuario;
    private javax.swing.JMenuItem mnuAjustes;
    private javax.swing.JMenuItem mnuBuscarFacturaCliente;
    private javax.swing.JMenuItem mnuBuscarFacturaNumero;
    private javax.swing.JMenuItem mnuBuscarSucursales;
    private javax.swing.JMenuItem mnuBuscarTransferenciaFecha;
    private javax.swing.JMenuItem mnuBuscarTransferenciaNumero;
    private javax.swing.JMenuItem mnuBuscarTransferenciaUsuario;
    private javax.swing.JMenu mnuCajaDiaria;
    private javax.swing.JMenuItem mnuCajaDiariaUsuario;
    private javax.swing.JMenuItem mnuCambiarContrasenia;
    private javax.swing.JMenu mnuCompras;
    private javax.swing.JMenuItem mnuDAPRegistrarPago;
    private javax.swing.JMenuItem mnuDAPRegustrarDeuda;
    private javax.swing.JMenuItem mnuDAPReporteDeudas;
    private javax.swing.JMenu mnuDeaudasAProveedores;
    private javax.swing.JMenu mnuDeudas;
    private javax.swing.JMenu mnuDeudasDeClientes;
    private javax.swing.JMenu mnuFacturas;
    private javax.swing.JMenuItem mnuHistorial;
    private javax.swing.JMenuItem mnuManArticulos;
    private javax.swing.JMenuItem mnuManProveedores;
    private javax.swing.JMenuItem mnuMantenimientoSucursales;
    private javax.swing.JMenu mnuMantenimientos;
    private javax.swing.JMenu mnuProformas;
    private javax.swing.JMenuItem mnuRegistrarCompra;
    private javax.swing.JMenuItem mnuRegistrarDeudaCliente;
    private javax.swing.JMenuItem mnuRegistrarPagoCliente;
    private javax.swing.JMenuItem mnuReindexar;
    private javax.swing.JMenuItem mnuRepVentasCliente;
    private javax.swing.JMenuItem mnuRepVentasFechas;
    private javax.swing.JMenu mnuReporteTransferencias;
    private javax.swing.JMenu mnuReportes;
    private javax.swing.JMenuItem mnuReportesDeudasClientes;
    private javax.swing.JMenuItem mnuRespaldar;
    private javax.swing.JMenu mnuServicios;
    private javax.swing.JMenu mnuSistema;
    private javax.swing.JMenuItem mnuStock;
    private javax.swing.JMenuItem mnuStockMinimo;
    private javax.swing.JMenu mnuSucursales;
    private javax.swing.JMenuItem mnuTransferir;
    private javax.swing.JMenuItem mnuUsuarios;
    private javax.swing.JPanel pnlResultados;
    private javax.swing.JTextField txtApellidos;
    private javax.swing.JTextField txtBuscar;
    private javax.swing.JTextField txtCedula;
    private javax.swing.JTextField txtDireccion;
    private javax.swing.JTextField txtEmail;
    private javax.swing.JTextField txtNombres;
    private javax.swing.JTextField txtSaldoCaja;
    private javax.swing.JTextField txtServicioTecnico;
    private javax.swing.JTextField txtTelefono;
    // End of variables declaration//GEN-END:variables
}
